Skip to content

ci(workflows): ternary GRADLE_USER_HOME for namespace runner#29791

Closed
jluque0101 wants to merge 1 commit into
namespace-runner-trialfrom
phase2/build-android-e2e-gradle-home
Closed

ci(workflows): ternary GRADLE_USER_HOME for namespace runner#29791
jluque0101 wants to merge 1 commit into
namespace-runner-trialfrom
phase2/build-android-e2e-gradle-home

Conversation

@jluque0101
Copy link
Copy Markdown
Contributor

@jluque0101 jluque0101 commented May 6, 2026

Phase 2 follow-up — cross-provider env-var divergence not handled by Phase 0.

build-android-e2e.yml hardcodes GRADLE_USER_HOME: /home/admin/_work/.gradle — that path is the Cirrus cirruslabs/ubuntu-runner-amd64 runner's home (user admin). On Namespace runners the user is runner, so Gradle fails to create the lock-file directory.

This PR ternaries the env var on runner_provider, mirroring Phase 0's runs-on ternary pattern:

GRADLE_USER_HOME: ${{ inputs.runner_provider == 'namespace' && '/home/runner/_work/.gradle' || '/home/admin/_work/.gradle' }}

Behaviour on runner_provider: current is byte-identical (the second branch returns the original Cirrus path).

Validated end-to-end on the integration-test branch: https://github.com/MetaMask/metamask-mobile/actions/runs/25435437017 (Build Android APKs ✓ in 20m56s, all 26 Android E2E smoke jobs ✓).


Note

Low Risk
Low risk CI-only change that adjusts a Gradle cache path to match the user home on Namespace runners; behavior on the existing Cirrus runner remains the same.

Overview
Updates the build-android-e2e.yml workflow to set GRADLE_USER_HOME via a runner_provider conditional, using /home/runner/_work/.gradle on Namespace runners and preserving the existing /home/admin/_work/.gradle path on the Cirrus runner.

This prevents Gradle failures on Namespace due to an incorrect home directory while keeping the current provider behavior unchanged.

Reviewed by Cursor Bugbot for commit a22e192. Bugbot is set up for automated code reviews on this repo. Configure here.

@jluque0101 jluque0101 requested a review from a team as a code owner May 6, 2026 13:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@github-actions github-actions Bot added the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 6, 2026
@metamaskbotv2 metamaskbotv2 Bot added the team-dev-ops DevOps team label May 6, 2026
@jluque0101
Copy link
Copy Markdown
Contributor Author

Folded into #29780 — same logical scope (cross-provider plumbing for Workstream D), and both touched build-android-e2e.yml. Branch will be deleted.

@jluque0101 jluque0101 closed this May 6, 2026
@jluque0101 jluque0101 deleted the phase2/build-android-e2e-gradle-home branch May 6, 2026 13:39
@github-actions github-actions Bot locked and limited conversation to collaborators May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. size-XS team-dev-ops DevOps team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant